<div id="navbar" class="nav">
	<ul>
	<?php $access = explode(",", $this->session->userdata('role'));
		  $user = $this->session->userdata('user');
	?>
	
	<?php if(in_array("staff", $access) && $user->staffProfile!=0){?>
		<li><a <?php  if($this->uri->segment(1)=='adminStaff') echo "class=\"active\" style=\"color:#2F3080;\""?> href="<?= site_url('adminStaff/staff/'.$user->staffProfile) ?>"><?= $user->username ?> </a></li>
	<?php }?>
	<?php if(in_array("news", $access)){?>
		<li><a <?php  if($this->uri->segment(1)=='adminNews') echo "class=\"active\" style=\"color:#2F3080;\""?> href="<?= site_url('adminNews/news') ?>"><?= $this->lang->line('news') ?> </a></li>
	<?php }?>
	<?php if(in_array("announcements", $access)){?>
		<li><a <?php  if($this->uri->segment(1)=='adminAnnouncements') echo "class=\"active\" style=\"color:#2F3080;\""?> href="<?= site_url('adminAnnouncements/announcements')?>"><?= $this->lang->line('announce') ?></a></li>
	<?php }?>
	<?php if(in_array("activities", $access)){?>
		<li><a <?php  if($this->uri->segment(1)=='adminActivities') echo "class=\"active\" style=\"color:#2F3080;\""?> href="<?= site_url('adminActivities/activities')?>"><?= $this->lang->line('activities') ?></a></li>
	<?php }?>
	<?php if(in_array("news", $access)){?>
		<li><a <?php  if($this->uri->segment(1)=='admin') echo "class=\"active\" style=\"color:#2F3080;\""?> href="<?= site_url('admin/fileUpload')?>"><?= $this->lang->line('file_upload') ?></a></li>
	<?php }?>
	<?php if(in_array("admin", $access)){?>
		<li><a <?php  if($this->uri->segment(1)=='adminUsers') echo "class=\"active\" style=\"color:#2F3080;\""?> href="<?= site_url('adminUsers/users') ?>"><?= $this->lang->line('users') ?></a></li>
	<?php }?>
	<?php if(in_array("admin", $access)){?>
		<li><a <?php  if($this->uri->segment(1)=='adminStaff') echo "class=\"active\" style=\"color:#2F3080;\""?> href="<?= site_url('adminStaff') ?>"><?= $this->lang->line('staff') ?></a></li>
	<?php }?>
	<?php if(in_array("admin", $access)){?>
		<li><a <?php  if($this->uri->segment(1)=='adminCourses') echo "class=\"active\" style=\"color:#2F3080;\""?> href="<?= site_url('adminCourses') ?>"><?= $this->lang->line('courses') ?></a></li>
	<?php }?>
	<?php if(in_array("studies", $access)){?>	
		<li><a <?php  if($this->uri->segment(1)=='adminStudies') echo "class=\"active\" style=\"color:#2F3080;\""?> href="<?= site_url('adminStudies/allStudies') ?>"><?= $this->lang->line('studies') ?></a></li>
	<?php }?>
	<?php if(in_array("studies", $access)){?>	
		<li><a <?php  if($this->uri->segment(1)=='adminProfiles') echo "class=\"active\" style=\"color:#2F3080;\""?> href="<?= site_url('adminProfiles/allProfiles') ?>"><?= $this->lang->line('profiles') ?></a></li>
	<?php }?>
	<?php if(in_array("questions", $access)){?>	
		<li><a <?php  if($this->uri->segment(1)=='adminQuestions') echo "class=\"active\" style=\"color:#2F3080;\""?> href="<?= site_url('adminQuestions/questions') ?>"><?= $this->lang->line('questions') ?></a></li>
	<?php }?>
		<li><a href="<?= site_url('admin/logout') ?>"><?= $this->lang->line('logout') ?> </a></li>
	</ul>
</div>